package com.newjiabo.ski.service.impl;

import java.util.List;
import com.newjiabo.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.newjiabo.ski.mapper.SkiOrderShootMapper;
import com.newjiabo.ski.domain.SkiOrderShoot;
import com.newjiabo.ski.service.ISkiOrderShootService;

/**
 * 约拍订单Service业务层处理
 * 
 * @author CaoMengHui
 * @date 2023-10-23
 */
@Service
public class SkiOrderShootServiceImpl implements ISkiOrderShootService 
{
    @Autowired
    private SkiOrderShootMapper skiOrderShootMapper;

    /**
     * 查询约拍订单
     * 
     * @param id 约拍订单主键
     * @return 约拍订单
     */
    @Override
    public SkiOrderShoot selectSkiOrderShootById(String id)
    {
        return skiOrderShootMapper.selectSkiOrderShootById(id);
    }

    /**
     * 查询约拍订单列表
     * 
     * @param skiOrderShoot 约拍订单
     * @return 约拍订单
     */
    @Override
    public List<SkiOrderShoot> selectSkiOrderShootList(SkiOrderShoot skiOrderShoot)
    {
        return skiOrderShootMapper.selectSkiOrderShootList(skiOrderShoot);
    }

    /**
     * 新增约拍订单
     * 
     * @param skiOrderShoot 约拍订单
     * @return 结果
     */
    @Override
    public int insertSkiOrderShoot(SkiOrderShoot skiOrderShoot)
    {
        skiOrderShoot.setCreateTime(DateUtils.getNowDate());
        return skiOrderShootMapper.insertSkiOrderShoot(skiOrderShoot);
    }

    /**
     * 修改约拍订单
     * 
     * @param skiOrderShoot 约拍订单
     * @return 结果
     */
    @Override
    public int updateSkiOrderShoot(SkiOrderShoot skiOrderShoot)
    {
        skiOrderShoot.setUpdateTime(DateUtils.getNowDate());
        return skiOrderShootMapper.updateSkiOrderShoot(skiOrderShoot);
    }

    /**
     * 批量删除约拍订单
     * 
     * @param ids 需要删除的约拍订单主键
     * @return 结果
     */
    @Override
    public int deleteSkiOrderShootByIds(String[] ids)
    {
        return skiOrderShootMapper.deleteSkiOrderShootByIds(ids);
    }

    /**
     * 删除约拍订单信息
     * 
     * @param id 约拍订单主键
     * @return 结果
     */
    @Override
    public int deleteSkiOrderShootById(String id)
    {
        return skiOrderShootMapper.deleteSkiOrderShootById(id);
    }
}
